package cn.edu.sdjzu.xg.bysj.domain;

import cn.edu.sdjzu.xg.bysj.domain.authority.Actor;
import lombok.*;


import java.io.Serializable;

@Setter
@Getter
@ToString
@NoArgsConstructor
@AllArgsConstructor

public final class Teacher
		extends Actor
		implements Comparable<Teacher>, Serializable {

	private Integer id;
	private String name;
	private String no;
	private ProfTitle profTitle;
	private Degree degree;
	private Department department;



	public Teacher(
			String name, String no) {
		super();
		this.name = name;
		this.no = no;
	}

	public Teacher(
			String name,
			String no,
			ProfTitle title,
			Degree degree,
			Department department) {
		this(name, no);
		this.profTitle = title;
		this.degree = degree;
		this.department = department;
	}

	@Override
	public int compareTo(Teacher other) {
		// no为排序依据
		return this.no.compareTo(other.no);
	}
}


